package com.fuze.questionnaire.domain.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author sepc_
 * @date 10/20/2021 15:06
 * 用户基础信息实体类
 */
@ApiModel(value = "basic_user_information_tab")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "basic_user_information_tab")
public class BasicUserInformation implements Serializable {
    private static final long serialVersionUID = -5410382755957619724L;
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "自增主键")
    private Integer id;

    /**
     * 姓名
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "姓名")
    private String name;

    /**
     * 性别
     */
    @TableField(value = "gender")
    @ApiModelProperty(value = "性别")
    private String gender;

    /**
     * 出生日期
     */
    @TableField(value = "birthday")
    @ApiModelProperty(value = "出生日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date birthday;

    /**
     * 民族
     */
    @TableField(value = "nation")
    @ApiModelProperty(value = "民族")
    private String nation;

    /**
     * 出生地
     */
    @TableField(value = "birthplace")
    @ApiModelProperty(value = "出生地")
    private String birthplace;

    /**
     * 婚姻状态
     */
    @TableField(value = "marital_status")
    @ApiModelProperty(value = "婚姻状态")
    private String maritalStatus;

    /**
     * 文化程度
     */
    @TableField(value = "education_level")
    @ApiModelProperty(value = "文化程度")
    private String educationLevel;

    /**
     * 岗位
     */
    @TableField(value = "jobs")
    @ApiModelProperty(value = "岗位")
    private String jobs;

    /**
     * 联系电话
     */
    @TableField(value = "telephone")
    @ApiModelProperty(value = "联系电话")
    private String telephone;

    /**
     * 身份证号
     */
    @TableField(value = "id_number")
    @ApiModelProperty(value = "身份证号")
    private String idNumber;

    /**
     * 小程序openid
     */
    @TableField(value = "openid")
    @ApiModelProperty(value = "小程序openid")
    private String openid;

    public static final String COL_ID = "id";

    public static final String COL_NAME = "name";

    public static final String COL_GENDER = "gender";

    public static final String COL_BIRTHDAY = "birthday";

    public static final String COL_NATION = "nation";

    public static final String COL_BIRTHPLACE = "birthplace";

    public static final String COL_MARITAL_STATUS = "marital_status";

    public static final String COL_EDUCATION_LEVEL = "education_level";

    public static final String COL_JOBS = "jobs";

    public static final String COL_TELEPHONE = "telephone";

    public static final String COL_ID_NUMBER = "id_number";

    public static final String COL_OPENID = "openid";
}